0 CLEAR
10 DIM FLAG(10,10)
20 CLS:GRAPH:LOCATE 1,7:PRINT "Perfect"
30 LOCATE 2,5:PRINT "1.Start"
40 LOCATE 3,5:PRINT "2.Load"
50 LOCATE 4,5:PRINT "3.Help"
60 LOCATE 5,5:PRINT "4.Exit";
70 C$=INKEY$
80 IF C$="1" THEN 500
100 IF C$="3" THEN 300
110 IF C$="4" THEN 6200 ELSE 70
300 CLS:GRAPH:PRINT "******Help******"
310 PRINT "Make All Black"
320 PRINT "s-Save"
330 PRINT "F1-Restart"
340 PRINT "All have solution";
350 C$=INKEY$: GOTO 20
500 CLS:GRAPH
800 LV=1
1000 CLS:GRAPH:LOCATE 3,8:PRINT "Level";LV;"";
1010 C$=INKEY$
1020 CLS:GRAPH
1100 FOR I=1 TO LV+1: FOR J=1 TO LV+1
1110 BOX I*8+64-(LV-1)*4,J*8+26-(LV-1)*4,I*8+68-(LV-1)*4,J*8+30-(LV-1)*4
1120 FLAG(I,J)=0
1130 NEXT :NEXT 
1500 X=1:Y=1
2000 BOX X*8+62-(LV-1)*4,Y*8+24-(LV-1)*4,X*8+70-(LV-1)*4,Y*8+32-(LV-1)*4
2010 C$=INKEY$
2020 IF C$=CHR$(20) THEN 2200
2030 IF C$=CHR$(21) THEN 2300
2040 IF C$=CHR$(23) THEN 2400
2050 IF C$=CHR$(22) THEN 2500
2060 IF C$=CHR$(13) THEN 3000
2070 IF C$=CHR$(28) THEN 1020
2080 IF C$=CHR$(27) THEN 6000
2200 IF Y=1 THEN 2010
2210 BOX X*8+62-(LV-1)*4,Y*8+24-(LV-1)*4,X*8+70-(LV-1)*4,Y*8+32-(LV-1)*4,0,0
2220 Y=Y-1
2230 GOTO 2000
2300 IF Y=LV+1 THEN 2010
2310 BOX X*8+62-(LV-1)*4,Y*8+24-(LV-1)*4,X*8+70-(LV-1)*4,Y*8+32-(LV-1)*4,0,0
2320 Y=Y+1
2330 GOTO 2000
2400 IF X=1 THEN 2010
2410 BOX X*8+62-(LV-1)*4,Y*8+24-(LV-1)*4,X*8+70-(LV-1)*4,Y*8+32-(LV-1)*4,0,0
2420 X=X-1
2430 GOTO 2000
2500 IF X=LV+1 THEN 2010
2510 BOX X*8+62-(LV-1)*4,Y*8+24-(LV-1)*4,X*8+70-(LV-1)*4,Y*8+32-(LV-1)*4,0,0
2520 X=X+1
2530 GOTO 2000
3000 IF Y=1 THEN 3100
3010 BOX X*8+65-(LV-1)*4,(Y-1)*8+27-(LV-1)*4,X*8+67-(LV-1)*4,(Y-1)*8+29-(LV-1)*4,1,2
3020 FLAG(X,Y-1)=1-FLAG(X,Y-1)
3100 IF Y=LV+1 THEN 3200
3110 BOX X*8+65-(LV-1)*4,(Y+1)*8+27-(LV-1)*4,X*8+67-(LV-1)*4,(Y+1)*8+29-(LV-1)*4,1,2
3120 FLAG(X,Y+1)=1-FLAG(X,Y+1)
3200 IF X=1 THEN 3300
3210 BOX (X-1)*8+65-(LV-1)*4,Y*8+27-(LV-1)*4,(X-1)*8+67-(LV-1)*4,Y*8+29-(LV-1)*4,1,2
3220 FLAG(X-1,Y)=1-FLAG(X-1,Y)
3300 IF X=LV+1 THEN 3400
3310 BOX (X+1)*8+65-(LV-1)*4,Y*8+27-(LV-1)*4,(X+1)*8+67-(LV-1)*4,Y*8+29-(LV-1)*4,1,2
3320 FLAG(X+1,Y)=1-FLAG(X+1,Y)
3400 BOX X*8+65-(LV-1)*4,Y*8+27-(LV-1)*4,X*8+67-(LV-1)*4,Y*8+29-(LV-1)*4,1,2
3410 FLAG(X,Y)=1-FLAG(X,Y)
3500 FINISH=1
3510 FOR I=1 TO LV+1: FOR J=1 TO LV+1
3520 IF FLAG(I,J)=0 THEN FINISH=0
3530 NEXT :NEXT 
3540 IF FINISH=1 THEN 5000 ELSE 2010
5000 IF LV=9 THEN 6000
5010 CLS:GRAPH:LOCATE 2,6:PRINT "Complete"
5020 LOCATE 3,3:PRINT "Now next level"
5030 LV=LV+1:C$=INKEY$
5040 GOTO 1000
6000 CLS:GRAPH
6010 LOCATE 3,3:PRINT "Save?(Y/N)"
6020 C$=INKEY$
6200 CLS:GRAPH
6210 LOCATE 3,6:PRINT "by Dumbear"
6220 END
